package com.yangyang.androidconnect.config;

import androidx.annotation.Nullable;

import com.alibaba.fastjson.JSONObject;
import com.yanzhenjie.andserver.framework.body.StringBody;
import com.yanzhenjie.andserver.util.MediaType;


public class FastjsonBody extends StringBody {

    public FastjsonBody(String body) {
        super(body);
    }

    public FastjsonBody(Object object) {
        super(JSONObject.toJSONString(object));
    }

    @Nullable
    @Override
    public MediaType contentType() {
        return MediaType.APPLICATION_JSON_UTF8;
    }
}